<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Other extends MY_Controller {
    
    public function index()
    {
        $this->setHeader('title', '分类');
        $this->navigation();
        
        $parm['where'] = array(
            'types'=>'page',
            'm.type'=>'page'
        );
        $thisData['texts'] = $this->Entries->getTopic($parm);
        $thisData['tags'] = $this->tags();
        $thisData['hot'] = $this->hots();
        $thisData['culture'] = $this->culture();
        $thisData['policy'] = $this->policy();
        $thisData['news'] = $this->news();
        
        $this->load->view('other', $thisData);
    }
    
    
    
    public function page()
    {
        $thisData['texts'] = $this->Entries->get_one_by_slug(urldecode($this->uri->segment(2)));
        //print_r($thisData);
        $this->setHeader('title',$thisData['texts']['titles']);
        $this->setHeader('keywords',$thisData['texts']['titles']);
        $this->setHeader('description',$thisData['texts']['description']);
        $this->navigation();
        
        $thisData['culture'] = $this->culture();
        $thisData['policy'] = $this->policy();
        $thisData['news'] = $this->news();
        $this->load->view('page', $thisData);
    }
}